]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
portalHelper: Set up accels from app
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 31 Mar 2026 19:39:05 +0000 (21:39 +0200)
committerMarge Bot <marge-bot@gnome.org>
Thu, 9 Apr 2026 14:55:22 +0000 (14:55 +0000)
Setting up accels is an app action, so doing it from the app is
a more natural place than repeating it for each window (even if
the common case is a single window for the entire process lifetime).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4159>

js/portalHelper/main.js

index 7004a327949fff7adefddb06e869f3b36eae7ced..46bd074d45c5357b0058ef3f734bd601885d4be0 100644 (file)
@@ -157,8 +157,6 @@ class PortalWindow extends Gtk.ApplicationWindow {
         this.set_child(this._webView);
         this.maximize();
         this.present_with_time(timestamp);
-
-        this.application.set_accels_for_action('app.quit', ['<Primary>q', '<Primary>w']);
     }
 
     _syncUri() {
@@ -302,6 +300,8 @@ class WebPortalHelper extends Adw.Application {
         const action = new Gio.SimpleAction({name: 'quit'});
         action.connect('activate', () => this.active_window.destroy());
         this.add_action(action);
+
+        this.set_accels_for_action('app.quit', ['<Primary>q', '<Primary>w']);
     }
 
     vfunc_dbus_register(connection, path) {